package io.summer.gadget.channel.core.impl;

import io.summer.basis.tool.ObjectTool;
import io.summer.gadget.channel.core.Protocol;

import java.lang.reflect.Type;

/**
 * @author Moonlight
 */
public final class JacksonProtocol implements Protocol {
  @Override
  public byte[] serialize(Object o) {
    return ObjectTool.serialize(o);
  }

  @Override
  public <T> T deserialize(byte[] s, Type dataType) {
    return ObjectTool.deserialize(s, dataType);
  }
}
